package com.jams.goodox.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jams.goodox.R;
import com.jams.goodox.entity.MyRedPacket;

import java.util.List;

/**
 * Created by Jin on 2016/5/18.
 * Description 积分产品列表适配器
 */
public class RedPacketChild1Adapter extends BaseQuickAdapter<MyRedPacket.DataBean.ResultListBean> {

	public RedPacketChild1Adapter(List<MyRedPacket.DataBean.ResultListBean> list) {
		super(R.layout.mine_red_child1_listview, list);
	}

	@Override
	protected void convert(BaseViewHolder baseViewHolder, MyRedPacket.DataBean.ResultListBean resultListBean) {
		baseViewHolder.setText(R.id.red_packet, "¥ " + resultListBean.getMoney())
                .setText(R.id.time, "有效期 :" + resultListBean.getValidDate())
                .setText(R.id.exchange, resultListBean.getExchange())
                .setText(R.id.serviceName, resultListBean.getServiceName())
                .setText(R.id.type_name, resultListBean.getRedPacketTypeName());
	}
}
